package br.com.tecnoria.vo
{
	import mx.collections.ArrayCollection;

	[Bindable]
	[RemoteClass(alias="CustomerVO")]
	public class CustomerVO
	{
		public var idCustomer:int;
		public var idUser:int;
		public var email:String;
		
		public var user:UserVO;
		public var address:Array;
		
		public function CustomerVO(customer:Object=null)
		{
			this.user = new UserVO;
			
			if (customer != null)
			{				
				this.idCustomer = customer.idCustomer;
				this.idUser = customer.idUser;
				this.email = customer.email;
				
				this.user = customer.user;
				this.address = customer.address;
			}
		}
		
		public function getName():String
		{
			return this.user.name;
		}
	}
}